#ifndef __INCLUDE_MEMORYMAP_H__
#define __INCLUDE_MEMORYMAP_H__
/*
	Memory map declarations

	Part of the as-yet-unnamed MC68010 operating system


	(c) Stuart Wallace <stuartw@atom.net>, May 2012.


	Memory map
	==========

	00:0000 - 0f:ffff		1M		RAM
	-----------------------------------------------------------
		00:0000 - 00:03ff	1K		CPU vector table
		00:0400 - 00:3fff	15K		OS global data segment
		00:4000 - 0d:ffff	880K	OS heap
		0e:0000 - 0f:ffff	128K	OS stack

	10:0000 - df:ffff		13M		[vacant]
	-----------------------------------------------------------
		10:0000 - df:ffff	13M		[vacant]

	e0:0000 - e0:ffff		1M		Memory-mapped peripherals
	-----------------------------------------------------------
		e0:0000 - e1:ffff	128K	DUART
		e2:0000 - e3:ffff	128K	ATA controller
		e4:0000 - e5:ffff	128K	Ethernet controller
		e6:0000 - ef:ffff	640K	[vacant]

	f0:0000 - ff:ffff		1M		Operating system ROM
	-----------------------------------------------------------
		f0:0000 - ff:ffff	1M		OS ROM
*/


#define MEMMAP_START			(0)			/* probably redundant 				*/

#define VECTOR_TABLE_START		(0)			/*    0K: CPU vector table			*/
#define VECTOR_TABLE_END		(0x000400)

#define OS_GLOBAL_DATA_START	(0x000400)	/*    1K: OS global space (31K)		*/
#define OS_GLOBAL_DATA_END		(0x008000)	/*			(.data)					*/

#define OS_HEAP_START			(0x008000)	/*   32K: OS private heap (128K)	*/
#define OS_HEAP_END				(0x028000)

#define OS_HEAP_SIZE_LOG2		(17)

#define OS_STACK_BOTTOM			(0x028000)	/*	160K: OS stack (32K)			*/
#define OS_STACK_TOP			(0x030000)

#define APP_MEM_START			(0x030000)	/*  192K: Application memory start	*/
#define APP_MEM_END				(0x100000)	/* 1024K: Top of memory				*/

#endif

